<?php
declare (strict_types = 1);

namespace app\api\validate;

use think\Validate;

class Mission extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'title'  =>  'require|max:50',
        'content'  =>  'require|min:10',
        'money'  =>  'require|number',
        'days_expire'  =>  'require|number',       
        'money_cfg'  =>  'require',       
    ];


    protected $scene = [
        'edit'  =>  ['title','content','cat_id'],
    ];  



    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [];
}
